"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . import views

urlpatterns = [
    # 首页
    url(r'^$', views.index,name = 'myhome_index'),
    # 商品列表
    url(r'^goods/list/(?P<uid>[0-9]+)/$', views.goodslist,name = 'myhome_goodslist'),
    # 商品详情页
    url(r'^goods/info/$', views.goodsinfo,name = 'myhome_goodsinfo'),



    # 将商品加入购物车
    url(r'^cart/add/$', views.cartadd,name = 'myhome_cartadd'),
    # 显示购物车
    url(r'^cart/index/$', views.cartindex,name = 'myhome_cartindex'),
    # 修改购物车
    url(r'^cart/edit/$', views.cartedit,name = 'myhome_cartedit'),
    # 删除所选的购物信息
    url(r'^cart/del/$', views.cartdel,name = 'myhome_cartdel'),
    # 删除单条
    url(r'^cart/delone/$', views.cartdelOne,name = 'myhome_cartdelOne'),
    # 获取城市信息
    url(r'^get/citys/$', views.getcitys,name = 'myhome_getcitys'),
    # 设置默认地址
    url(r'^set/address/$', views.setaddress,name = 'myhome_setaddress'),
    # 删除地址
    url(r'^address/del/$', views.addressdel,name = 'myhome_addressdel'),



    # 确认订单
    url(r'^order/confirm/$', views.orderconfirm,name = 'myhome_orderconfirm'),
    # 订单创建
    url(r'^order/create/$', views.ordercreate,name = 'myhome_ordercreate'),
    # 订单支付
    url(r'^order/buy/$', views.orderbuy,name = 'myhome_orderbuy'),
    # 收货地址添加
    url(r'^address/add/$', views.addressadd, name='myhome_addressadd'),
    # 收货地址
    url(r'^address/list/$', views.addresslist, name='myhome_addresslist'),

    # 我的订单
    url(r'^myinfo/order/$', views.myinfo_order, name='myhome_myinfo_order'),
    # 删除订单
    url(r'^myinfo/delorder/$', views.myinfo_delorder, name='myhome_myinfo_delorder'),
    # 个人资料
    url(r'^myinfo/introduction/$', views.myinfo_introduction, name='myhome_myinfo_introduction'),
    # 收货地址
    url(r'^myinfo/address/$', views.myinfo_address, name='myhome_myinfo_address'),
    # 删除地址
    url(r'^myinfo/deladdress/$', views.myinfo_deladdress, name='myhome_myinfo_deladdress'),
    # 个人中心设置默认地址
    url(r'^myinfo/editaddress/$', views.myinfo_editaddress, name='myhome_myinfo_editaddress'),
    # 修改地址
    url(r'^myinfo/addredit/$', views.myinfo_addressedit, name='myhome_myinfo_addressedit'),






    # 注册
    url(r'^register/$', views.register,name = 'myhome_register'),
    # 验证手机号
    url(r'^checkphone/$', views.checkphone,name = 'myhome_checkphone'),
    # 发送手机验证码
    url(r'^sendmsg/$', views.sendmsg,name = 'myhome_sendmsg'),
    # 登录
    url(r'^login/$', views.login,name = 'myhome_login'),
    # 退出登录 
    url(r'^logout/$', views.logout,name = 'myhome_logout'),






]
